package adminlogrouter

import (
	"vpn-management-server/src/controller/adminlogcontroller"
	"vpn-management-server/src/interceptor/adminloginterceptor"
	"vpn-management-server/src/router/routermodel"
	"vpn-management-server/src/service/adminlogservice"
)

var adminLogRouter = routermodel.NewRouter()

func init() {
	go adminlogservice.AddAdminLogs(adminlogservice.ChanAdminLogs)
	adminLogRouter.RegisterHandleSet("getPageAdminLogsByTimeStamp", adminloginterceptor.AdminLogsValidator, adminlogcontroller.GetAdminLogs, nil)
	adminLogRouter.RegisterHandleSet("getPageAdminLogsByTimeStampAndID", adminloginterceptor.AdminLogsIDValidator, adminlogcontroller.GetAdminLogsByAdminID, nil)

}
